import React from 'react';
import { render } from 'react-dom';
import { Router, Route, IndexRoute } from 'react-router';
import MainView from './MainView.jsx';
import RootView from './RootView.jsx';
import DrillView from './DrillView.jsx';
import TraceView from './TraceView.jsx';
import createHistory from 'history/lib/createHashHistory';
require('./style.less');

var history = createHistory({
  queryKey: false
});

render((
  <Router history={history}>
    <Route path="/" component={MainView}>
      <IndexRoute component={RootView} />
      <Route path="domain/:domainId" component={DrillView} />
      <Route path="domain/:domainId/url/:urlId" component={DrillView} />
      <Route path="trace/:traceId/timestamp/:timestamp" component={TraceView}/>
    </Route>
  </Router>
), document.getElementById('root'));
